Telegram Group & Telegram Channel
سلام به همه امروز سورس راه hotspot برای #ESP8266 براتون اماده کردم.
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>

//SSID and Password to your ESP Access Point
const char* ssid = "ESPWebServer";
const char* password = "12345678";

ESP8266WebServer server(80); //Server on port 80

//==============================================================
// This rutine is exicuted when you open its IP in browser
//==============================================================
void handleRoot() {
server.send(200, "text/plain", "hello from esp8266!");
}

//===============================================================
// SETUP
//===============================================================
void setup(void){
Serial.begin(9600);
Serial.println("");
WiFi.mode(WIFI_AP); //Only Access point
WiFi.softAP(ssid, password); //Start HOTspot removing password will disable security

IPAddress myIP = WiFi.softAPIP(); //Get IP address
Serial.print("HotSpt IP:");
Serial.println(myIP);

server.on("/", handleRoot); //Which routine to handle at root location

server.begin(); //Start server
Serial.println("HTTP server started");
}
//===============================================================
// LOOP
//===============================================================
void loop(void){
server.handleClient(); //Handle client requests
}
بعد از ران کردن این کد esp در سریال مانیتورینگ به شما یک ip خواهد داد که با وارد کردن ان در مرورگر خود قادر به مشاهده ی webserver راه اندازی شده توس esp در گوشی و یا سیستم خود هستید.


🌺🌺 با تشکر از مهندس
@MehdiYasinzade



tg-me.com/micropython_iot/188
Create:
Last Update:

سلام به همه امروز سورس راه hotspot برای #ESP8266 براتون اماده کردم.
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>

//SSID and Password to your ESP Access Point
const char* ssid = "ESPWebServer";
const char* password = "12345678";

ESP8266WebServer server(80); //Server on port 80

//==============================================================
// This rutine is exicuted when you open its IP in browser
//==============================================================
void handleRoot() {
server.send(200, "text/plain", "hello from esp8266!");
}

//===============================================================
// SETUP
//===============================================================
void setup(void){
Serial.begin(9600);
Serial.println("");
WiFi.mode(WIFI_AP); //Only Access point
WiFi.softAP(ssid, password); //Start HOTspot removing password will disable security

IPAddress myIP = WiFi.softAPIP(); //Get IP address
Serial.print("HotSpt IP:");
Serial.println(myIP);

server.on("/", handleRoot); //Which routine to handle at root location

server.begin(); //Start server
Serial.println("HTTP server started");
}
//===============================================================
// LOOP
//===============================================================
void loop(void){
server.handleClient(); //Handle client requests
}
بعد از ران کردن این کد esp در سریال مانیتورینگ به شما یک ip خواهد داد که با وارد کردن ان در مرورگر خود قادر به مشاهده ی webserver راه اندازی شده توس esp در گوشی و یا سیستم خود هستید.


🌺🌺 با تشکر از مهندس
@MehdiYasinzade

BY Micropython & IOT


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/micropython_iot/188

View MORE
Open in Telegram


Micropython & IOT Telegram | DID YOU KNOW?

Date: |

However, analysts are positive on the stock now. “We have seen a huge downside movement in the stock due to the central electricity regulatory commission’s (CERC) order that seems to be negative from 2014-15 onwards but we cannot take a linear negative view on the stock and further downside movement on the stock is unlikely. Currently stock is underpriced. Investors can bet on it for a longer horizon," said Vivek Gupta, director research at CapitalVia Global Research.

Micropython & IOT from in


Telegram Micropython & IOT
FROM USA